<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="zhangcheng">
		<title>单位帐户维护</title>
		<script language="javascript" src="../script/common.js" type="text/javascript"></script>
		<script type="text/javascript" language="JavaScript" src="../script/tree.js"></script>
		
		<!--动态js-->
		<script type="text/javascript">
			var qtUnit = {};//单位qt
			//页面加载方法
			function load(){
				Eui.showNavigation();									// 显示导航栏
				setPages(["listview","userdetaildiv"]);						//切换页面
				var cOrg = Common.cOrg()
				$("unitForm").currentOrg.value = cOrg.id;
				$("unitForm").currentOrgLevel.value = cOrg.orgLevel;
				createUnitTable();
			}		
			//单位客户帐户列表
			function createUnitTable(){									//显示查询结果方法
				var columns = []						
				columns[2] = {render:nameFunc}
				columns[6] = {title:"操作",width:"22",render:operateFunc,order:false}
				qtUnit = new QueryTable("acc_unit_manage","unitForm","unitDataList",columns);
			}
			//处理数据 点姓名进入编辑页面
			function nameFunc(v,r){								
				return "<a href=# onclick=\"showUser("+r[0]+",true);return false;\">"+v+"<\/a>"
			}
			//列表操作链接
			function operateFunc(v,r){
				return "<a href=# onclick=showUser('"+r[0]+"')>编辑<\/a>"
			}
			
			//（操作）编辑
			function showUser(id,view){								//编辑页面
				var opts = {isView:view}
				switchPage("userdetaildiv");
				CardMgnt.userDetail.show("userdetaildiv",id,null,opts)
			}
		</script>
	</head>
	
	<body onload="load()">
		<div class="nav"><div id="nav">&nbsp;</div></div>
		<div id="listview">	
			<div class="searchForm">
				<form id="unitForm" name="unitForm">
					<input name="currentOrg" type="hidden">
					<input name="currentOrgLevel" type="hidden">
					<table cellSpacing="0" cellPadding="4" width="100%" border="0">
						<tr>
							<td><label>单位名称</label> <input type="text" name="oname"></td>
							<td><label>客户编号</label> <input type="text" name="ooilNo" onBlur="checkV(this,'uniqueId')"></td>
							<td><button type="button" onclick="qtUnit.showTable()">查 询</button></td>
						</tr>
					</table>
				</form>
			</div>
			<div id="unitDataList"></div>
		</div>
		<div style="display:none;" id="userdetaildiv"></div>
	</body>
</html>
